int findPeakElement(int* nums, int numsSize){
    int left = 0, right = numsSize-1;
    while (left < right) {
        int mid = left + (right - left) / 2;
        // mid位置更大，[mid + 1, right]中不一定有峰值，但[left, mid]中一定有最大值或极值
        // mid
        //     \
        //      \
        //      mid+1
        if (nums[mid] > nums[mid + 1]) right = mid;
        else left = mid + 1;
    }
    return left;
}